package com.david.jetpack

import android.app.Activity
import android.os.Bundle
import com.david.jetpack.databinding.ActivityMainBinding
import com.david.jetpack.workmanager.WorkManagerTest

class MainActivity : Activity() {
    private lateinit var viewBinding: ActivityMainBinding
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        viewBinding = ActivityMainBinding.inflate(layoutInflater)
        setContentView(viewBinding.root)
//        GlobalScope.launch(context = Dispatchers.IO) {
//
//        }

        viewBinding.test.setOnClickListener {
            testWorkManager()
        }

    }

    private fun testWorkManager(){
        WorkManagerTest.test()
    }
}